import { lazy } from "react";
import { RouterItem } from "../utils/type";

const HomeRouter: RouterItem[] = [
  {
    id: 4,
    title: "为你推荐",
    path: "/home/recommend",
    element: lazy(() => import("../view/Recommend/index")),
  },
  {
    id: 5,
    title: "模板中心",
    path: "/home/template",
    element: lazy(() => import("../view/Template/index")),
  },
  {
    id: 6,
    title: "素材中心",
    path: "/home/meterial",
    element: lazy(() => import("../view/Meterial/index")),
  },
  {
    id: 7,
    title: "创建设计",
    path: "/home/create",
    element: lazy(() => import("../view/Create/index")),
  },
  {
    id: 8,
    title: "我的设计",
    path: "/home/mydesign",
    element: lazy(() => import("../view/Mydesign/index")),
  },
  {
    id: 9,
    title: "商品管理",
    path: "/home/guogoods",
    element: lazy(() => import("../view/GuoGoods/index")),
  },
  {
    id: 10,
    title: "果币充值",
    path: "/home/guorecharge",
    element: lazy(() => import("../view/GuoRecharge/index")),
  },
  {
    id: 11,
    title: "智能设计",
    path: "/home/guorder",
    element: lazy(() => import("../view/Guorder/index")),
  },
  {
    id: 12,
    title: "果首页",
    path: "/home/guohome",
    element: lazy(() => import("../view/GuoHome/index")),
  },
  {
    id: 13,
    title: "图片编辑",
    path: "/home/imageediting",
    element: lazy(() => import("../view/Imageediting/index")),
  },
  {
    id: 14,
    title: "批量设计",
    path: "/home/batchdesign",
    element: lazy(() => import("../view/Batchdesign/index")),
  },
  {
    id: 15,
    title: "意见反馈",
    path: "/home/opinions",
    element: lazy(() => import("../view/Opinions/index")),
  },
  {
    id: 16,
    title: "在线客服",
    path: "/home/socket",
    element: lazy(() => import("../view/Socket/index")),
  },
  {
    id: 17,
    title: "新手教程",
    path: "/home/tutorial",
    element: lazy(() => import("../view/Tutorial/index")),
  },
  {
    id: 18,
    title: "提交模版需求",
    path: "/home/demand",
    element: lazy(() => import("../view/Demand/index")),
  },
  {
    id: 20,
    title: "创建设计",
    path: "/home/featured",
    element: lazy(() => import("../view/FeaturedPages/index")),
  },
  {
    id: 21,
    title: "工作台",
    path: "/home/workbench",
    element: lazy(() => import("../view/Workbench/index")),
  },
  {
    id: 23,
    title: "日历跳转弹框",
    path: "/home/createteam",
    element: lazy(() => import("../view/Createteam/index")),
  }
];

const Router: RouterItem[] = [
  {
    path: "/",
    to: "/home",
  },
  {
    id: 1,
    path: "/login",
    title: "登录",
    element: lazy(() => import("../view/Login/index")),
  },
  {
    id: 2,
    path: "/home",
    title: "首页",
    element: lazy(() => import("../view/Home/index")),
    children: HomeRouter,
  },
  {
    id: 3,
    path: "/register",
    title: "注册",
    element: lazy(() => import("../view/Register/index")),
  },
  {
    id: 19,
    title: "个人中心",
    path: "/home/mycenter",
    element: lazy(() => import("../view/Mycenter/index")),
  },
  {
    id: 22,
    title: "创建设计弹框",
    path: "/createtemplate",
    element: lazy(() => import("../view/Createtemplate/index")),
  },
  {
    id: 23,
    title: "企业服务",
    path: "/enterprise",
    element: lazy(() => import("../view/Enterprise/index")),
  },
];

export default Router;
